package com.lanou;

import com.alibaba.dubbo.config.annotation.Reference;
import com.lanou.bean.UserEntity;
import com.lanou.service.UserService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by lizhongren1.
 */
@Controller
public class MainController {

    @Reference(version = "1.0.0")
    private UserService userService;

    @ResponseBody
    @RequestMapping(value = "/login")
    public String login(String testString) {

        // 登录鉴权
        UserEntity userEntity = userService.login(testString);

        return userEntity.getuName();
    }


}
